package com.example.motion.controller;

import com.example.motion.config.ResultT;
import com.example.motion.model.MotionActivityDate;
import com.example.motion.service.IMotionActivityDateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <br>Title:
 * <br>Description:
 * <br>Author:
 * <br>Date:
 */
@RestController
@RequestMapping("/activity")
public class MotionActivityDateController {

    @Autowired
    private IMotionActivityDateService iMotionActivityDateService;

    /**
     * 获取活动期限
     * @return
     */
    @GetMapping("/getActivityDate")
    public ResultT getActivityDate() {
        return ResultT.ok(iMotionActivityDateService.getActivityDate());
    }


    /**
     * 获取活动状态
     * @return
     */
    @GetMapping("/getActivityStatus")
    public ResultT getActivityStatus() {
        return ResultT.ok(iMotionActivityDateService.getActivityStatus());
    }
}
